package com.my.mvpframe.ui.task;

import android.support.annotation.Nullable;
import android.util.Log;

import com.my.mvpframe.base.dagger.ActivityScoped;

import javax.inject.Inject;

/**
 * Created by tomey on 2018/2/1.
 */

@ActivityScoped
class TaskPresenter extends TaskContract.Presenter {
    @Inject
    TaskPresenter() {
    }

    @Nullable
    private TaskContract.View view;

    @Override
    void showData() {
        if (view != null) {
            view.showToast();
        }
        Log.e("twb", "showData()");
    }

    @Override
    void showFragmentData() {
        Log.e("twb", "showFragmentData()");
    }

    @Override
    public void takeView(TaskContract.View taskView) {
        this.view = taskView;
    }
}
